import request from '@/request/request' 

// 获取所有记录
export const getAll =  ()=>{
    return request({
        method: 'get',
        url:'/getall',
    })
}

// 添加学生记录
export const addStudent =  (name, date, address)=>{
    return request({
        method: 'get',
        url:`/addstudent?name=${name}&date=${date}&address=${address}`,
    })
}

// 删除记录
export const deleteStudent =  (ids)=>{
    return request({
        method: 'post',
        url:`/deletestudent`,
        params:{
            ids
        }
    })
}

// 修改记录
export const editStudent =  (id,name,date,address)=>{
    return request({
        method: 'get',
        url:`/editstudent?id=${id}&name=${name}&date=${date}&address=${address}`,
    })
}